<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="com.asiainfo.ysrman.doprocess.*"%>
<%	
    String mobile = "00000000000";
	if (session.getAttribute("mobile")!=null)
		mobile = session.getAttribute("mobile").toString();
	//System.out.println("mobile="+mobile);
	String awardno = "0";
	if ( request.getParameter("awardno") != null )
		awardno = request.getParameter("awardno");	
	int awardid = 0;
	if (awardno != null || !awardno.equals("") )
		awardid = Integer.parseInt(awardno);
	
	//System.out.println("awardno="+awardid);
	
	if(request.getMethod().equals("POST"))	
	{
		int retn_ = 1;
		int score = 40;
		if ( awardid == 2 || awardid == 3 )
		{
			if (awardid == 2)
				score = 40;
			if (awardid == 3)
				score = 30;
			if ( !mobile.equals("") )
			{
				retn_ = new YsrProcess().changeAward(mobile,awardid,score);
				//System.out.println("mobile="+mobile);
				//System.out.println("awardid="+awardid);
				//System.out.println("score="+score);
			   //System.out.println("retn_="+retn_);
			   if ( retn_ == 0 )
				   out.println(awardid);
			   else
				   out.println(retn_);
			}			
			else
			out.println("1");
			
		}
		else
			out.println("1");		
	}
	else
	{
		out.println("-1");
	}
%>

